package com.lgw.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.lgw.demo.service.OrderService;
import com.lgw.demo.service.PersonOrderService;

@Controller
public class OrderController {
    //多对多 订单 商品
    //设计表 订单表 商品表 中间表

    //查询
    @Autowired//注入
    OrderService orderService;

    @RequestMapping("orderlist")
    public String orderlist(Model model){
        model.addAttribute("list",orderService.findAllOrder());
        return "orderlist.html";
    }


}
